// highoperate.cpp : implementation file
//

#include "stdafx.h"
#include "Statistics.h"
#include "highoperate.h"
#include "setpro.h"
#include "changepsw.h";
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// Chighoperate dialog


Chighoperate::Chighoperate(CWnd* pParent /*=NULL*/)
	: CDialog(Chighoperate::IDD, pParent)
{
	//{{AFX_DATA_INIT(Chighoperate)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void Chighoperate::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(Chighoperate)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(Chighoperate, CDialog)
	//{{AFX_MSG_MAP(Chighoperate)
	ON_BN_CLICKED(IDC_HIGH_RT, OnHighRt)
	ON_BN_CLICKED(IDC_HIGH_SET, OnHighSet)
	ON_BN_CLICKED(IDC_LOGIN_QUERY, OnLoginQuery)
	ON_BN_CLICKED(IDC_OPR_QUERY, OnOprQuery)
	ON_WM_CLOSE()
	ON_WM_CREATE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// Chighoperate message handlers

void Chighoperate::OnHighRt() 
{
	ShowWindow(SW_HIDE);	
	HWND hwnd;
	hwnd=::FindWindow(NULL,"Statistik");
	SetWindowPos(NULL,490,270,NULL,NULL,SWP_NOSIZE);
	AnimateWindow(hwnd, 500, AW_BLEND|AW_ACTIVATE);
	DestroyWindow();
	delete this;	
}

void Chighoperate::OnHighSet() 
{
	// TODO: Add your control notification handler code here
	Csetpro *pro = new Csetpro();
	pro->DoModal();
}

void Chighoperate::OnLoginQuery() 
{
	// TODO: Add your control notification handler code here

	Cchangepsw * dlg=new Cchangepsw(1,this);
	dlg->DoModal();
	
	//dld->
}

void Chighoperate::OnOprQuery() 
{

	Cchangepsw * dlg=new Cchangepsw(2,this);
	dlg->DoModal();
}

BOOL Chighoperate::PreTranslateMessage(MSG* pMsg) 
{
if(pMsg-> message==WM_KEYDOWN   &&   pMsg-> wParam==VK_ESCAPE)     return   TRUE; 
   if(pMsg-> message==WM_KEYDOWN   &&   pMsg-> wParam==VK_RETURN)   return   TRUE;   
  else  	
	return CDialog::PreTranslateMessage(pMsg);
}

void Chighoperate::OnClose() 
{
	// TODO: Add your message handler code here and/or call default
	
	OnHighRt();
}

int Chighoperate::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CDialog::OnCreate(lpCreateStruct) == -1)
		return -1;
	
		CenterWindow();	
	return 0;
}
